
package edu.weber.bookstore.models;

import java.util.HashMap;
import java.util.Map;

/**
 * 
 * 
 */
public class ViewModel
{
	private static Map<String, Object> _globals = new HashMap<String, Object>();
	
	/**
	 * Sets a global variable to be used throughout the app in any page.
	 * @param name the name of the object in the model.
	 * @param obj the value to be set
	 */
	public static void setGlobalVariable(String name, Object obj)
	{
		_globals.put(name, obj);
	}
	
	/**
	 * Returns a map object to pass to the view.
	 * @return a Map<String, Object> to pass to the view for the model data.
	 */
	public Map<String, Object> getMap()
	{
		return _globals;
	}
}
